DevFormatLab

URL Encode / Decode

Percent-encode · Decode · Query-safe

Encode or decode URLs and URI components locally, with options for query strings and form data.

96 chars → 158 chars · 158 bytes
InputValid
Output

All URL encoding and decoding runs locally in your browser.

What is URL encoding?

URL encoding, also called percent-encoding, converts characters that are not safe inside a URL into %HH byte sequences. Spaces, Japanese or Chinese text, emoji, slashes inside query values, and symbols like & or = can change the meaning of a URL if they are not encoded correctly. This tool lets you encode a full URL with encodeURI-style behavior or encode a single URI component with encodeURIComponent-style behavior. It also supports application/x-www-form-urlencoded space handling, where spaces are represented as + inside form bodies and query strings.

Features

  • Encode full URLs or individual URI components
  • Decode percent-encoded strings with clear error feedback for malformed sequences
  • Optional + ↔ space handling for form and query-string data
  • Unicode-safe via the browser's native encodeURI / encodeURIComponent APIs
  • Real-time output with one-click copy and download
  • 100% browser-based — no upload, no tracking

How to use

  1. Choose Encode or Decode at the top of the tool.
  2. Enable Component mode when you are encoding a query parameter value, path segment or callback URL; disable it for a full URL.
  3. Enable + spaces when working with application/x-www-form-urlencoded data.
  4. Paste text on the left and copy the transformed result on the right.

Frequently Asked Questions

Should I encode a full URL or a component?

Use full URL mode when the string already has URL structure such as https://example.com/path?a=1. Use component mode for values that will be inserted into a URL, for example a search query, redirect_uri, filename or path segment. Component mode encodes reserved characters like /, ?, &, = and # so they cannot break the surrounding URL.

What is the difference between %20 and + for spaces?

%20 is the standard percent-encoded space in URLs. The + form is used by application/x-www-form-urlencoded, commonly seen in HTML forms and query strings. This tool can convert spaces to + on encode and + back to spaces before decode when the option is enabled.

Why do I get a malformed URI error?

Decoding fails when the input contains an incomplete percent sequence such as %E3%81 or a lone %. Keep the original bytes intact, or encode the text again from the source before decoding.

Is Unicode handled correctly?

Yes. Browser URL APIs encode Unicode as UTF-8 percent sequences, so Japanese, Chinese, emoji and accented characters round-trip correctly when the input is valid.

Related tools

Canonical: https://devformatlab.com/en/url-encoder