Text Case Converters
Encoding Tools

URL Encoder/Decoder — Encode and Decode URLs with Percent-Encoding Instantly

A search query like "coffee & tea" breaks a URL the moment the & is read as a query-string separator — this URL encoder / decoder fixes that. Paste any text and it's instantly percent-encoded: spaces become %20, & becomes %26, special characters become their %XX equivalents. Paste a percent-encoded URL and it's decoded back to readable text. Developers use it to build query strings, SEO teams use it to decode GSC log URLs, and API teams use it to debug encoded payloads. No signup needed.

Advertisement
0 words0 chars
Advertisement

What Is URL Encode / Decode?

A URL encoder/decoder converts text to and from percent-encoding — the format used to safely include special characters in URLs. In percent-encoding, each unsafe character is replaced by a % followed by its two-digit hexadecimal ASCII code: a space becomes %20, an ampersand becomes %26, a forward slash becomes %2F. This allows URLs to contain characters that would otherwise break the URL structure or be misinterpreted by browsers and servers.

URL encoding is essential anywhere text appears in a URL: query parameters, form submissions, API endpoints, and redirect targets all require proper encoding to transmit special characters without ambiguity. Developers debug URL encoding issues constantly — a missing % or an incorrectly encoded character can cause 400 errors, broken redirects, and failed API calls. This tool lets you encode raw text into URL-safe format or decode percent-encoded strings back to readable text instantly.

Example
hello world & morehello%20world%20%26%20more

Before & After: URL Encode / Decode Examples

Real input → output pairs showing exactly what this tool does to your text.

InputURL Encode / Decode Output
Hello WorldHello%20World
coffee & teacoffee%20%26%20tea
https://site.com?q=hello worldhttps://site.com?q=hello%20world
résumér%C3%A9sum%C3%A9
price%3A%2419.99 (decode)price:$19.99

Key Features

RFC 3986 Percent-Encoding

Implements encodeURIComponent-style encoding per RFC 3986 — encodes all characters except unreserved (A–Z, a–z, 0–9, -, _, ., ~), making query values safe across all HTTP clients, proxies, and servers.

Auto-Detect Encode / Decode

Input is analysed automatically — percent-encoded strings (%XX sequences) are decoded; plain text is encoded. No mode toggle needed.

Decode GSC & Server Log URLs

Paste a percent-encoded URL from Google Search Console, Nginx logs, or HTTP headers and read the actual path and parameter values in human-readable form.

RFC 3986 Percent-Encoding — Handles UTF-8 Multibyte Characters

Encoding and decoding happen entirely in your browser. Sensitive query values, API keys, and redirect URLs never leave your device.

When to Use URL Encode / Decode

✓ Use it for

Use when building query strings, API request URLs, or passing special characters inside a URL.

★ Pro tip

Spaces become %20. This uses encodeURIComponent which encodes all chars except A–Z, 0–9, -_.~

Who Should Use This Tool?

Web & API Developers

Encode query parameter values and form data for safe URL construction, and decode percent-encoded strings from API responses for debugging.

SEO Specialists & Webmasters

Decode percent-encoded URLs in GSC reports, server logs, and redirect rules to understand actual URL content and fix encoding issues.

QA Engineers & Testers

Construct test URLs with special characters by encoding parameter values, and decode received URLs to verify correct encoding in requests.

Industry Standard

Percent-encoding was defined in RFC 3986 (URI: Generic Syntax, 2005). The HTML form encoding variant (+ for spaces) is defined in the HTML specification (application/x-www-form-urlencoded). JavaScript's encodeURIComponent() implements RFC 3986 encoding for query values. WHATWG URL Standard (used in modern browsers) defines the URL parsing and encoding rules for the web platform. Google recommends UTF-8 encoded URLs for all web content.

Key Use Cases

  • Encode a search query containing spaces and special characters for a GET request URL parameter.
  • Decode percent-encoded URLs from Google Search Console or server logs to read the actual URL paths and parameters.
  • URL-encode redirect destination URLs containing query strings for safe use in 301/302 Location headers.
  • Encode user-generated content before including in a URL to prevent injection attacks through malformed URL structure.
  • Decode percent-encoded form submission data from request logs to debug form processing and input handling issues.

URL Encode / Decode vs Other Formats

How this tool compares to related approaches and methods

Method / FormatBest For
THISThis toolQuick encode/decode of query values, debugging GSC/log URLs, and inspecting percent-encoded strings
JavaScript encodeURIComponent()In-code URL parameter encoding in JavaScript/TypeScript frontend and Node.js
Python urllib.parse.quote()Server-side URL encoding in Python scripts, Django/Flask view params, and API clients
Browser address bar auto-encodeHuman-typed navigation — not suitable for API construction or programmatic URL building

URL Encode / Decode Rules: How It Works

How Percent-Encoding Works
  • Each unsafe character is replaced by % followed by its two-digit hexadecimal ASCII code: space → %20, & → %26.
  • Safe characters NOT encoded: A–Z, a–z, 0–9, hyphen (-), underscore (_), period (.), tilde (~).
  • encodeURIComponent() style — structural URL characters (: / ? # @ ! $ &) are also encoded, making it safe for query values.
  • Spaces can appear as %20 (path/query standard) or + (HTML form encoding) — both are valid in different contexts.
  • Non-ASCII characters (emoji, accented letters) are first converted to UTF-8 bytes, then each byte is percent-encoded.
Common Mistakes
  • ×Encoding the whole URL — only encode query parameter VALUES, not the structural characters (?, &, =, ://).
  • ×Confusing %20 and + for spaces — + is valid only in HTML form submissions, not in URL path segments.
  • ×Double-encoding — running already-encoded text through again produces %2520 instead of %20.
  • ×Using URL encoding for HTML attributes — use HTML encoding (&) for HTML contexts, percent-encoding for URLs.

Where It's Applied

API query stringsGET /search?q=hello%20world — query values must be percent-encoded so & and = aren't misread.
HTTP redirects301 Location headers with query strings need encoded values to survive transit through proxies.
Google Search ConsoleGSC reports URLs in percent-encoded form — decode to read actual path and parameter values.
HTML form submissionsBrowser encodes form field values as application/x-www-form-urlencoded before sending.
nginx / Apache configRewrite rules compare against decoded paths; use $arg_name for decoded query parameter access.
OAuth / SAMLCallback URLs in OAuth flows must be percent-encoded when passed as a redirect_uri parameter.

How to Use URL Encode / Decode

  1. Select Encode or Decode using the toggle buttons.
  2. Paste your text into the Input Text box.
  3. The result appears instantly on the right.
  4. Click Copy to copy the output to your clipboard.

This Converter vs Manual Methods

Why use this tool instead of doing it by hand?

MethodLimitation
Manually replacing each special characterError-prone for & = + # and non-ASCII — easy to miss or double-encode a character
JavaScript encodeURIComponent()Requires opening browser console or writing a script — no one-click decode of an existing URL
Python urllib.parse.quote()Requires Python installation and coding knowledge — not quick for one-off inspection
Browser address bar paste-and-readIncomplete — does not encode all reserved characters and varies by browser; no reliable encode for API use
✓ BESTThis toolNone

Common Mistakes & Pro Tips

  • !Encoding an entire URL when only the parameter values should be encoded — the protocol (https://), domain, slashes, and query string delimiters (? and &) should NOT be percent-encoded. Only encode the values of query parameters, not the structural characters of the URL itself.
  • !Confusing %20 and + for spaces — in query strings, both %20 and + represent a space (+ is the "application/x-www-form-urlencoded" convention). In path segments, only %20 is correct; + is a literal plus sign. This context difference causes bugs when encoding is applied in the wrong URL section.
  • !Double-encoding an already-encoded URL — running a percent-encoded URL through the encoder again converts % to %25, producing %2520 instead of %20. Before encoding, check whether the input is already encoded. If a URL contains %XX sequences, decode it first, then re-encode only the parts that need encoding.

Frequently Asked Questions

Everything you need to know about URL Encode / Decode

What characters need to be URL-encoded?

+

URL-reserved characters that need encoding in query values include: space ( → %20), & (→%26), = (→%3D), + (→%2B), # (→%23), % (→%25), < (→%3C), > (→%3E), " (→%22), { } | \ ^ ` and all non-ASCII characters. Characters that are safe and do NOT need encoding: A-Z, a-z, 0-9, hyphen (-), underscore (_), period (.), tilde (~).

What is the difference between encodeURIComponent and encodeURI in JavaScript?

+

encodeURI() encodes a full URL — it does NOT encode characters that are valid in URLs: : / ? # [ ] @ ! $ & ' ( ) * + , ; =. Use it for encoding a complete URL. encodeURIComponent() encodes everything including those structural URL characters — it's meant for encoding individual query parameter values where & and = must be escaped to avoid breaking the query string structure. Use encodeURIComponent for values, encodeURI for full URLs.

Why do some URLs use %20 and others use + for spaces?

+

Two different encoding standards coexist: RFC 3986 percent-encoding (used in URL paths and most modern APIs) represents spaces as %20. HTML form encoding (application/x-www-form-urlencoded, used in form submissions) represents spaces as +. Browsers use + when submitting forms; most API clients use %20. Servers need to handle both. Mixing them up causes spaces to appear as literal "+" in decoded output.

What does a properly URL-encoded URL look like?

+

Example: the query "coffee & tea" in a search URL becomes ?q=coffee+%26+tea (form encoding) or ?q=coffee%20%26%20tea (percent encoding). The & is encoded as %26 to prevent it from being interpreted as a query string delimiter. The space is encoded as + or %20. The key principle: structural URL characters have meaning (&, =, ?, #) and must be encoded when they appear as data values.

Does URL encoding affect SEO?

+

Properly encoded URLs are handled correctly by all search engines — Google decodes percent-encoding when indexing URLs. However, inconsistently encoded URLs (the same page accessible at both encoded and un-encoded versions) can create duplicate content issues if canonical tags aren't set correctly. Google recommends using consistently formatted URLs and setting canonical tags to consolidate signals to your preferred URL format.

How are non-ASCII characters like Chinese or emoji URL-encoded?

+

Non-ASCII characters are first encoded to UTF-8 bytes, then each byte is percent-encoded. Example: the Chinese character 中 (U+4E2D) encodes to the 3-byte UTF-8 sequence E4 B8 AD, which becomes %E4%B8%AD in a URL. The emoji 🌍 (U+1F30D) encodes to the 4-byte UTF-8 sequence F0 9F 8C 8D, which becomes %F0%9F%8C%8D. This is the standard defined in RFC 3986 and the WHATWG URL Standard.

What is the difference between URL encoding and HTML encoding?

+

URL encoding (percent-encoding) is for safe use in URL query strings and paths — & becomes %26, space becomes %20. HTML encoding (entity encoding) is for safe rendering inside HTML markup — & becomes &amp;, < becomes &lt;. Both may be needed when you have a URL inside an HTML attribute: the URL value should be percent-encoded first, and the whole URL string should then be HTML-encoded for safe use in the href attribute. Mixing them (using &amp; inside a URL string, or %26 inside HTML text) breaks the respective parser.

Related Tools

FM
Written by Foysal Mostafa · Developer & Tool Builder · Last reviewed: September 17, 2026
Advertisement