PRPickrack

URL Encoder / Decoder

Percent-encode URL parameters or decode them. encodeURIComponent or encodeURI behavior. Browser-side, instant.

0 chars
0 chars

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 toolToggle between encoding and decoding. Swap button moves the output back to the input field.
  • Two encoding methodsencodeURIComponent (default — encodes reserved chars including & = ? #) and encodeURI (preserves URL structure). Choose based on whether you're encoding a value or a whole URL.
  • Live updateType or paste — output recomputes instantly. No 'convert' button to click.
  • Error reporting on decodeMalformed %XX sequences are caught and explained instead of silently corrupted.
  • Character countersInput and output character counts shown — useful for URL length budgets (browsers cap at ~2,000-8,000 chars depending on engine).

How to use

  1. Step 1: Pick modeEncode (text → percent-encoded) or Decode (percent-encoded → text).
  2. Step 2: Pick method (encode only)encodeURIComponent for individual query values; encodeURI for whole URLs.
  3. Step 3: Paste your stringOutput 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