Skip to main content

URL Encoder/Decoder

Safely encode or decode URLs and text strings for web transmission. Supports batch processing.

URL Encoder / Decoder

Encoding Style:
Text / URLs to Encode
Encoded Output
edit_note By Meet Dhameliya
update Updated: Jul 28, 2026
schedule 3 min read

URLs frequently contain special characters that can break links, API calls, or query parameters. Spaces become %20, ampersands become %26, and non-ASCII characters like accented letters or emoji are encoded as multi-byte percent sequences. URL encoding (also called percent-encoding) converts these characters to a format safe for transmission in HTTP requests. The reverse is equally important: you receive an encoded URL from a log file, analytics report, or API response and need to read the human-readable version. The Utility Spark URL Encoder/Decoder handles both directions instantly, using your browser's built-in encodeURIComponent() and decodeURIComponent() functions.

lightbulb When to use this tool

  • check_circle Encode query parameter values before constructing API URLs programmatically
  • check_circle Decode percent-encoded URLs from server logs or analytics reports to read them
  • check_circle Prepare URL-safe strings for redirect parameters and callback URLs
  • check_circle Debug issues with double-encoded URLs (encoding an already-encoded string)
  • check_circle Encode non-ASCII characters (accented letters, CJK characters, emoji) for use in URLs
  • check_circle Decode URLs extracted from HTML source code or JSON API responses

Why use our tool?

Standards-Compliant Encoding

Uses JavaScript's encodeURIComponent() which follows RFC 3986. This correctly encodes all characters except A-Z, a-z, 0-9, and - _ . ~ — exactly the characters that are safe in URL components.

Bi-Directional Conversion

Encode plain text to URL-safe format, or decode percent-encoded strings back to readable text. Both operations are available in one interface with instant results.

Handles Complex Characters

Correctly encodes multi-byte Unicode characters (emoji, CJK characters, Cyrillic, Arabic) into their proper percent-encoded form. Each character is encoded as its UTF-8 byte sequence.

Privacy-Safe Processing

URLs often contain session tokens, user IDs, API keys, and tracking parameters. This tool processes everything in your browser — no URL data is sent to any server.

Instant Results

The conversion happens as you type, giving you immediate feedback. No submit button, no waiting — useful when iterating on URL construction for API integrations.

How it works

1

Select the mode: 'Encode URL Component' for query parameter values and path segments, 'Encode Full URL' for complete URL strings.

2

Select the direction: 'Encode' (raw → percent-encoded) or 'Decode' (percent-encoded → raw).

3

Paste your input string into the text area.

4

The encoded or decoded result appears instantly in the output area.

5

Click 'Copy' to copy the result.

Examples

science Encoding a JSON Query Parameter

Use case: Passing a JSON filter object as a URL query parameter
Raw input: {"status":"active","date":"2024-07-28"}
Mode: Encode URL Component
Encoded output: %7B%22status%22%3A%22active%22%2C%22date%22%3A%222024-07-28%22%7D
Usage: /api/orders?filter=%7B%22status%22%3A%22active%22%2C%22date%22...

science Decoding a Webhook Callback URL

Received in log: callback_url=https%3A%2F%2Fmyapp.com%2Fwebook%3Ftoken%3Dabc123
Mode: Decode URL Component
Decoded: https://myapp.com/webhook?token=abc123
Now readable for debugging or configuration

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent? expand_more
encodeURI() encodes a complete URL but preserves characters that are valid in URLs (: / ? # @ etc.). encodeURIComponent() encodes everything except unreserved characters — it's meant for encoding individual parameter values. Use encodeURIComponent() for query parameter values, and encodeURI() for complete URLs.
Why does a space become %20 in URLs? expand_more
The percent-encoding scheme represents unsafe characters as %XX where XX is the hexadecimal ASCII code. Space is ASCII 32 (hex 20), so it becomes %20. In form submissions, spaces may also appear as + signs, which is an older convention from HTML form encoding.
What is double encoding? expand_more
Double encoding happens when you encode an already-encoded string. For example, %20 becomes %2520 (the % is encoded to %25). This is a common bug in URL construction that causes 404 errors or incorrect parameter values. Always check if your input is already encoded before encoding it.
Are URLs case-sensitive? expand_more
It depends on the part. The scheme (http/https) and domain name are case-insensitive. The path, query parameters, and fragment are case-sensitive on most servers (Linux/Unix). Percent-encoded characters are case-insensitive (%2f and %2F both mean /), but RFC 3986 recommends uppercase.

More Developer & Security