jQuery.isNumeric(value) (alias $.isNumeric) returns true when value represents a finite JavaScript number (added in jQuery 1.7). As of jQuery 3.0, that means type number or a string that coerces to a finite number.
Pass any value; read the boolean; then parse or reject.
Start with a value (number, form string, option, etc.).
Call $.isNumeric(value) — true means finite numeric.
If true, convert with Number(value) or parseFloat as needed.
Still apply your own range rules (min/max) after the type check.
Piece
Required?
Role
value
Yes
Any JavaScript value to test
Return
—
Boolean — finite number / numeric string?
Follow-up
Usual
Parse + validate range for your app
Pseudocode
Pseudocode
function isNumeric(value):
// jQuery 3.0+ idea (simplified)
if type(value) is not "number" and not "string":
return false
if value is NaN or Infinity or -Infinity:
return false
// string must coerce to a finite number as a whole
return value represents a finite number
// Typical form flow:
raw = $("#qty").val()
if $.isNumeric(raw):
n = parseFloat(raw)
else:
show error
Reference
Cheat Sheet
Keep these facts handy while checking numeric values with jQuery.
Partial strings."-0x42" and "7.2acdgs" are not clean numeric strings.
Empty / object."" and {} are not numbers.
Special numbers.NaN and Infinity fail the finite check.
Other types.null, true, and undefined return false (jQuery 3.0+).
Example 3 — Validate a Quantity Input
Confirm the field is numeric before accepting a value.
jQuery
function checkQty(raw) {
if (!$.isNumeric(raw)) return "Enter a valid number";
var n = parseFloat(raw);
if (n < 1) return "Minimum quantity is 1";
return "OK: " + n;
}
console.log(checkQty("5")); // "OK: 5"
console.log(checkQty("abc")); // "Enter a valid number"
console.log(checkQty("0")); // "Minimum quantity is 1"
NaN type.typeof NaN is "number", but $.isNumeric(NaN) is false.
Modern path. For real numbers, prefer Number.isFinite(10).
Edge Cases & Pitfalls
Check these before relying on $.isNumeric() in real projects.
deprecated
Gone in jQuery 4.0
Plan a migration now. Use Number.isFinite for numbers; keep a tiny helper if you still need string support.
css
"10px" is false
CSS lengths are not whole numeric strings. Strip units yourself before checking, or parse with a dedicated CSS parser.
empty
Do not trust isNaN("")
Empty string coerces to 0 under isNaN. Prefer $.isNumeric (legacy) or Number.isFinite patterns instead.
jQuery 3
Booleans are false since 3.0
Older jQuery treated some coerced values differently. In 3.0+, only number and numeric string types can pass.
Compatibility
Browser Support
jQuery.isNumeric() needs jQuery 1.7–3.x in the browser. It was deprecated in 3.3 and removed in jQuery 4.0. Native Number.isFinite() works in all modern browsers.
✓ Deprecated · jQuery 3.3
jQuery.isNumeric()
Available with jQuery 1.7–3.x in Chrome, Firefox, Safari, and Edge. Prefer Number.isFinite() for new code. Not present in jQuery 4.0.
LegacyjQuery 3.x only
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
$.isNumeric()jQuery 1.7–3.x
Bottom line: Use $.isNumeric(val) only in jQuery 3.x legacy apps. For new projects, use Number.isFinite() (and a string helper when form input must pass).
Analysis
Performance Notes
Approach
Cost
Best for
$.isNumeric(v)
O(1)
Legacy jQuery validation
Number.isFinite(n)
O(1)
Actual numbers (modern)
isNaN(v)
O(1)
Avoid for empty-string checks
All of these checks are cheap. Clarity and correctness matter more than micro-benchmarks — especially around empty strings and Infinity.
Remember
Key Takeaways
Role:$.isNumeric(v) → finite number or numeric string?
One line:$.isNumeric is a finite-number gate for legacy jQuery — learn it to read old code, migrate new code to Number.isFinite.
Frequently Asked Questions
jQuery.isNumeric(value) returns true when value is a finite number, or a string that can be coerced into a finite number (such as "10", "-3.5", or "8e5"). It returns false for empty strings, booleans, objects, NaN, Infinity, null, undefined, and partial strings like "10px".
Yes. It was deprecated in jQuery 3.3 and removed in jQuery 4.0. It still works in jQuery 3.x for legacy code. Prefer Number.isFinite() for real numbers, or a small helper when you must accept numeric strings from form inputs.
Yes — as of jQuery 3.0 it accepts type number or type string when the string coerces to a finite number. "42", "-10", "3.1415", "0xFF", and "8e5" all return true. "10px" and "7.2acdgs" return false.
isNaN coerces values and can surprise you — isNaN("") is false because "" becomes 0. $.isNumeric("") is false. Use $.isNumeric (or Number.isFinite) when you want a stricter finite-number check.
Only finite numeric values pass. Infinity and NaN have typeof "number" in JavaScript, but they are not useful as ordinary numeric input — jQuery excludes them on purpose.
For actual numbers, use Number.isFinite(value). For form strings, trim first, then check with Number.isFinite(Number(str)) or parseFloat plus a finite check — and still validate ranges for your app.