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 6 / Unicode 8.0.0.

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.

It is a reserved word.

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 ES5. You may want to avoid 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 v5.1.0. You may want to avoid using it if support for JavaScript engines with outdated Unicode data tables 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.