Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1981
Encoding utility

URL Encoder and Decoder

Percent-encode and decode URLs and URL components with the browser's own encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI. Toggle space as %20 or +, and see malformed input flagged instead of silently mangled.

Client-sideRFC 3986UTF-8

Input

Result

Type something to convert.
All encoding and decoding runs locally in your browser. Nothing is uploaded — safe for URLs that carry tokens or session identifiers.

What URL encoding is for

A URL has a strict syntax. A handful of characters — the colon, slash, question mark, hash, ampersand, equals sign, and a few others — act as structural delimiters that mark where the scheme, host, path, query, and fragment begin and end. Any data you want to carry inside one of those parts must avoid colliding with the delimiters, and any byte outside the small set of URL-safe characters must be escaped. Percent-encoding solves both problems: each unsafe byte is written as a % followed by its two-digit hexadecimal value, and multi-byte UTF-8 characters become a run of those escapes.

This tool wraps the four standard JavaScript primitives. encodeURIComponent escapes everything that is not an unreserved character, so it is the right choice for a single query value or path segment. encodeURI assumes you have already assembled a complete URL and leaves the reserved delimiters intact so the address keeps working. The two decode functions reverse each direction. Because they are the browser's own implementations, the output matches exactly what your application code will produce at runtime.

When to use it

Reach for component encoding whenever you build a query string or insert user data into a path — a search term, an email address, a redirect target, or a base64 token that contains +, /, or =. Reach for full-URL encoding when you have a finished address that contains spaces or accented characters and you only want the unsafe bytes fixed, not the structure rewritten. On the decode side, paste a percent-encoded value from a server log, a browser address bar, or an OAuth redirect_uri to read it back as plain text and confirm it was encoded correctly.

Input and output

The input box takes any text. The result panel shows the converted string plus badges with the active mode, the character count, and the UTF-8 byte count, so you can spot expansion at a glance — one accented letter or one reserved character often becomes three or more output characters. The + versus %20 toggle applies only to the two encode modes: with it on, spaces become + for form-style query values; with it off you get the standards-default %20. On decode modes the toggle additionally turns a literal + back into a space first, matching how form data is read. Decoding is wrapped in a guard: a lone % or an invalid escape produces a clear inline error showing the offending sequence rather than a wrong or partial value.

Common mistakes

Related tools

Base64

Decode tokens you find in query strings — many JWTs and IDs are Base64 before they are URL-encoded.

Open Base64 →

Base32

Case-insensitive encoding used for TOTP secrets and other values that travel in URLs.

Open Base32 →

More utilities

Parsers, decoders, and references for smart-card and FIDO engineers.

All resources →