Skip to main content
SlapMyWeb
Skip to tool
Free tool

URL encoder & decoder

Encode special characters for safe URL transmission, or decode percent-encoded strings back to readable text. Pure client-side, your data never leaves the browser.

encoded
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den

What is URL Encoder & Decoder?

URL encoding (also called percent encoding) converts special characters into a format that can be safely transmitted in URLs. Characters like spaces, ampersands, question marks, and non-ASCII characters are replaced with percent-encoded equivalents (e.g., space becomes %20, & becomes %26). This is essential because URLs can only contain a limited set of ASCII characters. Without encoding, special characters in query parameters, form data, or path segments can break URL parsing or cause security issues. This tool uses JavaScript's built-in encodeURIComponent() and decodeURIComponent() functions, which handle the full Unicode character set including emojis and international characters. All processing happens in your browser — no data is sent to any server.

How to Use URL Encoder & Decoder

  1. 1

    Choose encode or decode

    Select Encode to convert special characters to percent-encoded format, or Decode to convert percent-encoded strings back to readable text.

  2. 2

    Enter your text or URL

    Paste a URL with special characters, a query string value, or any text. The output updates instantly as you type.

  3. 3

    Copy the result

    Click Copy to grab the encoded or decoded output for use in your URLs, API requests, or application code.

Features

  • Encodes all special characters for URL-safe transmission
  • Decodes percent-encoded URLs back to readable text
  • Full Unicode support including emojis and CJK characters
  • Uses standard encodeURIComponent/decodeURIComponent
  • Real-time conversion as you type
  • 100% client-side — your data never leaves the browser

Related Tools

Frequently Asked Questions

What characters does URL encoding convert?+
URL encoding converts all characters except unreserved ones (A-Z, a-z, 0-9, -, _, ., ~). Spaces become %20, & becomes %26, = becomes %3D, and so on. Unicode characters are first encoded as UTF-8 bytes, then percent-encoded.
When should I URL-encode data?+
Always encode values being placed in URL query parameters, form data, path segments, or fragment identifiers. This prevents special characters from being misinterpreted as URL delimiters.
What is the difference between encodeURI and encodeURIComponent?+
encodeURI encodes a full URL but preserves characters like :, /, ?, and &. encodeURIComponent encodes everything except unreserved characters, making it suitable for individual query parameter values. This tool uses encodeURIComponent.
Is URL encoding the same as HTML entity encoding?+
No. URL encoding uses percent signs (%20 for space), while HTML entity encoding uses ampersand notation (& for &). They serve different purposes — URL encoding for URLs, HTML encoding for HTML documents.
Can I encode entire URLs?+
This tool uses encodeURIComponent which encodes everything including :// and /. For encoding individual query parameter values, this is correct. To encode a full URL while preserving its structure, use encodeURI() in your code instead.
Is my data sent to a server?+
No. All encoding and decoding happens in your browser using built-in JavaScript functions. Your data never leaves your device.