Enkode / Dekode URL

Tren 🔥

Enkode atau dekode komponen URL seketika.

Alat Developer

Cara Menggunakan Enkode / Dekode URL

  1. 1Tempel teks Anda
  2. 2Klik Encode untuk mengubah ke format URL, atau Decode untuk kembali
  3. 3Salin hasilnya

Tentang Enkode / Dekode URL

URL Encode/Decode mengonversi teks ke dan dari pengkodean URL.

Fitur Utama Enkode / Dekode URL

  • Encode text to URL-safe percent-encoded format instantly
  • Decode percent-encoded strings back to readable text
  • Supports both encodeURIComponent and full URI encoding modes
  • Handles Unicode characters, spaces, and all special characters
  • One-click copy for encoded and decoded output
  • Works entirely in-browser — no data is sent to any server
  • Instant results with no submit button required
  • Useful for debugging malformed URLs and query strings

Format yang Didukung

Format Input

Teks biasaString yang dikodekan persen (format %XX)URL lengkapNilai string kueri

Format Output

String yang dikodekan persenTeks biasa yang didekode

Menggunakan semantik encodeURIComponent / decodeURIComponent.

Contoh

Encode a search query for use in a URL

Make a user-entered search term safe to append to a URL query string.

Input

hello world & more

Output

hello%20world%20%26%20more

Decode a percent-encoded API parameter

Convert a percent-encoded string from an API log back to readable text.

Input

email%3Duser%40example.com%26name%3DJohn%20Doe

Output

email=user@example.com&name=John Doe

Kasus Penggunaan Umum

  • Encoding user-submitted form data before appending to a URL
  • Decoding percent-encoded query parameters in API logs for debugging
  • Preparing special characters for use in redirect URLs
  • Encoding email addresses or JSON values for URL query strings
  • Debugging broken URLs that contain unencoded reserved characters
  • Preparing URL parameters for OAuth 1.0 signature base strings

Pemecahan Masalah

Spaces appear as + instead of %20

Solusi

Plus signs (+) encode spaces in application/x-www-form-urlencoded format. Use %20 for spaces in standard URL encoding.

Encoding a full URL changes the slashes and colons

Solusi

Only encode individual parameter values with encodeURIComponent, not entire URLs.

Double-encoded strings like %2520 appear in the output

Solusi

This happens when you encode an already-encoded string. Decode first, then re-encode.

Pertanyaan yang Sering Diajukan

What is URL encoding?

URL encoding (percent encoding) converts characters not allowed in URLs to a % followed by their two-digit hex code. For example, a space becomes %20 and an ampersand becomes %26.

When do I need URL encoding?

You need URL encoding whenever you pass special characters (spaces, &, =, ?, #) as values in query strings, form submissions, or API parameters.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a complete URL and leaves structural characters (/, :, ?, #, &) intact. encodeURIComponent encodes everything including those structural characters, making it suitable for individual query parameter values.

Why does a space sometimes appear as + in URLs?

The + sign is an older, HTML form-specific way to encode spaces. Standard percent encoding uses %20. Both are widely used, but %20 is correct per RFC 3986.

Is URL encoding the same as Base64 encoding?

No. URL encoding converts characters to %XX hex format for URLs. Base64 encoding converts binary data to printable ASCII for text-based protocols.

Can I encode an entire URL?

You can, but typically you should only encode individual query parameter values. Encoding a full URL will also encode the scheme and slashes, making it invalid.

Is my data sent to a server?

No. All encoding and decoding is performed locally in your browser. No data is transmitted or stored.

What characters are not encoded?

Unreserved characters — letters (A–Z, a–z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~) — are never encoded as they are safe in URLs.