↑↓ to navigateEnter to openEsc to close

Identifiers & web

URL Encoder, Decoder & Query Parser

Percent-encode a URL component or full URI, decode it once, and inspect an absolute URL with ordered query parameters.

URL Encoder workspace

Component mode also encodes /, ? and #. Full URI mode keeps URL separators.

Choose component or full URI mode. Ctrl/Cmd+Enter encodes.

Parsed URL

Processed locally

Your input stays in this browser tab. This tool makes no upload or API request and does not save input history.

About this url encoder

Percent encoding replaces selected UTF-8 bytes with % followed by two hexadecimal digits. The characters that need encoding depend on whether the input is one component or an entire URL.

Component mode is appropriate for a path segment or query value and encodes separators such as /, ? and #. Full URI mode preserves those structural characters. The parser requires an absolute URL and keeps duplicate query keys in their original order.

URL encoding (percent-encoding) transforms special characters into safe, transmissible form: spaces become %20, ampersands become %26, slashes become %2F. Different contexts require different encoding: query values encode more characters than full URIs, and mistakes in scope lose data or break URLs. This free online URL encoder and decoder handles both modes correctly, supporting component encoding (for individual values) and full URI encoding (for complete URLs).

Beyond basic encoding and decoding, the parser breaks down absolute URLs into components: scheme, hostname, port, path, query parameters, and fragment. See exact parameter names and values with order preserved—crucial for APIs that accept duplicate parameters or require specific key order. The component mode lets you safely encode individual query values or path segments without accidentally encoding URL structure.

Real-world scenarios include building dynamic URLs for APIs, extracting parameters from received URLs, encoding form data for transmission, and debugging redirect URLs. The strict decoding runs only once, preventing double-decoding bugs that can turn encoded delimiters back into structural characters and create security holes. All processing is local; URLs and their parameters stay private.

How to use this tool

  1. 01

    Identify the input scope

    Select component for one value. Select full URI only when the input already contains the complete URL structure.

  2. 02

    Encode or decode one layer

    Malformed percent sequences produce an error. The decoder intentionally runs once because repeated decoding changes meaning.

  3. 03

    Inspect an absolute URL

    Parse protocol, origin, hostname, port, path, query and fragment without supplying an implicit base URL.

Worked examples

Encode a query value

Input
hello world & more
Result
hello%20world%20%26%20more

Repeated query keys

Input
https://example.com/?tag=one&tag=two
Result
tag → one
tag → two

Limits and edge cases

  • Do not encode an entire URL as one component unless you intentionally want to encode its /, ?, & and # separators.
  • URLSearchParams uses application/x-www-form-urlencoded behavior for query parsing, where + represents a space and %2B represents a literal plus.
  • Decoding is performed once. Automatically decoding again can turn data into delimiters and create security bugs.
  • The inspector requires an absolute URL with a scheme. Relative URLs need an explicit base, which this page deliberately does not guess.

Standards and references

Common questions

When should I use component mode?

Use it for one path segment, query name or query value. It encodes structural delimiters that would otherwise change the surrounding URL.

Why is a space sometimes + and sometimes %20?

URL percent encoding can represent space as %20. HTML form and URLSearchParams query serialization commonly uses + for space; a literal plus is %2B.