JavaScript variable name validator

Wondering if you can use a given string as a variable name in JavaScript? Learn how it works, or just use this tool.

That’s a valid identifier according to ECMAScript 5.1 / Unicode 6.2.

However, the NaN, Infinity, and undefined properties of the global object are immutable or read-only. Setting them won’t have an effect. Avoid using this variable name.

However, web browsers are supposed to support it, as long as at least one character is escaped using a Unicode escape sequence.

However, it is an ES3 reserved word. You may want to avoid using it if support for older JavaScript engines is a concern.

However, it is not a valid identifier as per ES3. You may want to avoid using it if support for older JavaScript engines is a concern.

However, it’s not a valid identifier according to Unicode 3.0. You may want to avoid using it if support for older JavaScript engines is a concern.

It looks like your browser’s JavaScript engine doesn’t handle this variable name correctly. Good catch! Please file a bug. For Chrome/v8, you can just leave a comment on bug #1965. For Safari or other WebKit browsers that use the JavaScriptCore engine, comment on bug #79353. For Internet Explorer/Chakra, comment on bug #725622. For Opera/Carakan, report a new bug, but refer to ticket DSK-358119.