URL Encoder / Decoder
Percent-encode URL parameters or decode them. encodeURIComponent or encodeURI behavior. Browser-side, instant.
Percent-encode URL parameters or decode them. Toggle encodeURIComponent (full) vs encodeURI (URL-safe). Browser-side.
URL Encoder / Decoder percent-encodes characters that would break a URL — spaces, &, ?, =, #, non-ASCII — or decodes a percent-encoded string back to readable text. Pickrack exposes both encodeURIComponent (encodes everything reserved, for individual query values) and encodeURI (preserves /, ?, =, &, for whole URLs), so you can pick the right semantics for your use case.
Common pain point: a developer uses encodeURI when they need encodeURIComponent, then their & and = in query values get treated as separators. Pickrack shows both side-by-side in seconds so you don't ship a broken URL.
Free, no signup, browser-side. Input strings never leave your tab. Errors (e.g., malformed %XX sequences in decode mode) display inline with the failing position.
Key features
- Encode + Decode in one tool — Toggle between encoding and decoding. Swap button moves the output back to the input field.
- Two encoding methods —
encodeURIComponent(default — encodes reserved chars including&=?#) andencodeURI(preserves URL structure). Choose based on whether you're encoding a value or a whole URL. - Live update — Type or paste — output recomputes instantly. No 'convert' button to click.
- Error reporting on decode — Malformed
%XXsequences are caught and explained instead of silently corrupted. - Character counters — Input and output character counts shown — useful for URL length budgets (browsers cap at ~2,000-8,000 chars depending on engine).
How to use
- Step 1: Pick mode — Encode (text → percent-encoded) or Decode (percent-encoded → text).
- Step 2: Pick method (encode only) —
encodeURIComponentfor individual query values;encodeURIfor whole URLs. - Step 3: Paste your string — Output updates live. Use the Copy button to grab the result.
When to use
- Build a query string by hand — encode each value before joining with
& - Debug a malformed URL — paste the encoded version, see what it decodes to
- OAuth state / redirect_uri parameters — these MUST be encoded with encodeURIComponent or the auth flow breaks
- Pre-encode user search input before constructing a search URL
- Read someone else's encoded URL to understand what they're requesting
- Pre-encode JSON before putting it in a URL (rare but happens for some webhook signatures)
Frequently asked questions
What's the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes reserved URL chars (& = ? # / : @), so it's safe for individual query values. encodeURI preserves them because it assumes the input is already a structured URL. Rule: encoding a value → encodeURIComponent. Encoding an already-built URL → encodeURI.
Why does my decoded string have weird chars?
Most often the input was double-encoded (encoded twice). Run Decode twice and see if the result becomes sensible. Less commonly, the encoding used a non-UTF-8 charset (rare in 2026).
What characters are 'unreserved' and never encoded?
Per RFC 3986: letters, digits, - _ . ~. Everything else gets percent-encoded by encodeURIComponent. encodeURI ALSO leaves ; , / ? : @ & = + $ ! * ' ( ) # unencoded.
Can I encode Unicode (emoji, Vietnamese diacritics)?
Yes. JavaScript's encoders convert non-ASCII to UTF-8 bytes first, then percent-encode each byte. So é becomes %C3%A9 (2 bytes). Decoders reverse this correctly.
Why does '+' encode to '%2B' but decode treats '+' as space?
Two different conventions. RFC 3986 says + is a literal plus in the path/query (encoded as %2B). The application/x-www-form-urlencoded form encoding treats + as space. JavaScript's decodeURIComponent follows RFC 3986 — + stays as +. If you're decoding a form-encoded body, replace + with %20 first.
How long can a URL be?
Spec says no limit, but browsers cap effectively: Chrome ~32k chars, IE/Edge legacy 2,083 chars, Safari ~80k. Servers also cap (Apache 8k default, nginx 8k default). For safety stay under 2,000 chars; for query strings under 1,000 chars.
Related tools
Base64 Encoder
Encode and decode Base64 strings. Supports text and file modes. Browser-side, instant.
HTML Entity Encoder
Escape HTML special chars (& < > " ') or decode entities. Named, numeric, or all modes.
JSON Formatter
Format, validate, and minify JSON. Detects errors with line numbers. Browser-side, your data never leaves your device.