Encoders, Hash & Security Tools

Free URL Encoder and Decoder

A browser-based URL encoder and decoder. Convert text to percent-encoded format for safe inclusion in URLs, query parameters, and API requests. Supports two modes: encodeURIComponent (encodes all special characters for query values) and encodeURI (preserves URL structure characters like : / ? & =).

Loading tool...

What is URL Encoder and Decoder?

A browser-based URL encoder and decoder. Convert text to percent-encoded format for safe inclusion in URLs, query parameters, and API requests. Supports two modes: encodeURIComponent (encodes all special characters for query values) and encodeURI (preserves URL structure characters like : / ? & =).

quickAnswer

Encode or decode URL-encoded text with one click. Choose full encoding (encodeURIComponent) for query values or URL-safe (encodeURI) for complete URLs.

Last updated: 2026-06-05

limitations

  • Does not handle non-UTF-8 character encodings — all input is assumed to be UTF-8 text.
  • Does not support batch encoding of multiple URLs — each input is processed individually.
  • Very long input strings (over 1MB) may be slow to encode in the browser.

Sources:MDN Web Docs · W3C Specifications · jquery.app on GitHub

How to use this tool

  1. Choose Encode or Decode direction.
  2. Select the encoding mode: Component (full) for query parameter values, or URI (safe) for complete URLs.
  3. Paste your text and copy the result.

What you can use it for

  • Encode special characters in query parameter values before appending them to a URL.
  • Decode a messy URL from browser address bar to see the original readable text.
  • Build UTM parameters for marketing links with proper encoding of spaces and special characters.

Use cases

Practical examples

example

Encode query parameter values

A developer builds a search URL with user input. They encode the search term 'hello world & more' to 'hello%20world%20%26%20more' using encodeURIComponent before adding it to the query string.

example

Decode a copied URL

A marketer copies a long URL with many percent-encoded characters. They paste it into the decoder and see the readable URL with actual spaces, ampersands, and special characters restored.

Common mistakes

  • Using encodeURI when encoding query parameter values — encodeURI preserves & and = which breaks query string parsing. Use encodeURIComponent for parameter values.
  • Double-encoding — encoding an already-encoded string produces garbled output like %25 for a percent sign.
  • Forgetting to encode the ? and # characters in user input used in URLs — these characters have special meaning in URL parsing.

verification

  1. Encode a string with spaces and special characters like 'hello world & test' and verify spaces become %20 and & becomes %26.
  2. Decode a percent-encoded string and verify all special characters are restored correctly.

FAQ

Questions about URL Encoder and Decoder

What is the difference between encodeURI and encodeURIComponent?

encodeURI is for encoding a complete URL — it preserves characters that have structural meaning like : / ? & = #. encodeURIComponent encodes EVERYTHING, including those structural characters. Use encodeURI for full URLs, encodeURIComponent for individual query parameter values.

Why do I see %20 in URLs?

%20 is the percent-encoded form of a space character. URLs cannot contain literal spaces, so spaces are encoded as %20 (or sometimes + in query strings). Other special characters like &, =, ?, and # are also percent-encoded to avoid being interpreted as URL syntax.

Related tools

More encoders, hash & security tools

Encoders, Hash & Security Tools

COOP/COEP/CORP Header Builder

Build Cross-Origin isolation headers for SharedArrayBuffer, WebAssembly threads, and cross-origin security. Choose from presets with debugging checklists.

Open tool

Encoders, Hash & Security Tools

CORS Header Generator

Generate CORS HTTP headers for any origin, method, and credential configuration. Output in raw HTTP, Nginx, Apache, Express, or Cloudflare Workers format.

Open tool

Encoders, Hash & Security Tools

CSP Hash Generator

Generate CSP hash values for inline scripts and styles. Hash exact code content with SHA-256, SHA-384, or SHA-512 and get the matching CSP directive snippet.

Open tool

Also try

Also try