decodeURI() reverses percent-encoding in URIs while keeping structural characters intact. Pairs with encodeURI() for safe round-trip URL encoding.
Reference
Global Functions
Top-level functions available in every JavaScript environment.
- decodeURI()
- decodeURIComponent()
decodeURIComponent() reverses percent-encoding on URI components, decoding reserved characters like /, ?, and & that decodeURI() leaves untouched.
- encodeURI()
Use encodeURI() to encode a complete URI by escaping special characters while preserving structural characters such as slashes, question marks, and ampersands.
- encodeURIComponent()
encodeURIComponent() percent-encodes strings for safe use in query strings and path segments, escaping all chars except letters, digits, and - _ . ! ~ * ( ).
- eval()
The eval() function executes JavaScript code from strings — covers syntax, security risks, performance costs, and safer alternatives.
- isNaN()
Determine if a value is NaN (Not-a-Number). Differs from Number.isNaN() by coercing its argument to a number first.
- parseFloat()
parseFloat() reads a string and returns a floating-point number, stopping at the first non-numeric character. Use it for CSS values and user input.
- parseInt()
parseInt() parses a string in a specified radix and returns an integer, handling whitespace, non-numeric suffixes, and number bases from binary to hexadecimal.
- queueMicrotask()
queueMicrotask() schedules a function to run as a microtask, after the current task finishes and before the event loop yields control.
- structuredClone()
structuredClone() creates a deep copy of any structured-cloneable JavaScript value. Handles Maps, Sets, Dates, RegExps, typed arrays, and circular references.