വിപുലമായ ഓപ്ഷനുകൾ
+ ഇനെ Spaces ആക്കുക
Enable ചെയ്യുമ്പോൾ, + characters spaces ആക്കും. Query parameters decode ചെയ്യുമ്പോൾ ഇത് ഉപകാരപ്രദമാണ്.
Live മോഡ്
Enable ചെയ്യുമ്പോൾ, ടൈപ്പ് ചെയ്യുന്നതനുസരിച്ച് ടെക്സ്റ്റ് automatic ആയി decode ചെയ്യും.
ഈ options-കൾ URLs-ൽ encoded characters decode ചെയ്യുന്ന രീതി control ചെയ്യാൻ സഹായിക്കുന്നു.
URL decoding എന്നാൽ എന്ത്?
URL decoding percent-encoding reverse ചെയ്യുന്നു: encoded URL-ൽ ഉള്ള %XX escape sequences വായിച്ച് അവ represent ചെയ്യുന്ന characters-ലേക്ക് തിരികെ മാറ്റുന്നു. Browser, API, അല്ലെങ്കിൽ log line encoded ആക്കി തന്ന URL-ൽ നിന്ന് readable query string, form value, അല്ലെങ്കിൽ path segment recover ചെയ്യുന്നത് ഇങ്ങനെയാണ്.
URL decoding എങ്ങനെ പ്രവർത്തിക്കുന്നു?
URL decoding percent-encoded sequences അവയുടെ original characters-ലേക്ക് തിരികെ convert ചെയ്യാൻ ഒരു specific process follow ചെയ്യുന്നു:
- Input string-ൽ percent-encoded escape sequences (%XX) തിരയുന്നു
- ഓരോ %XX-ഉം അതിന്റെ രണ്ട് hexadecimal അക്കങ്ങളിൽ നിന്ന് യഥാർത്ഥ byte value-ലേക്ക് തിരികെ convert ചെയ്യുന്നു
- തുടർച്ചയായ decode ചെയ്ത bytes UTF-8 characters-ലേക്ക് വീണ്ടും കൂട്ടിച്ചേർക്കുന്നു (ഒരു multi-byte sequence ഒറ്റ character ആയി മാറുന്നു)
- query-string context-ൽ, + ഒരു space ആയി decode ചെയ്യുന്നു (application/x-www-form-urlencoded), എന്നാൽ %2B ഒരു literal + ആയി തുടരുന്നു
- Reserved അല്ലാത്ത characters-ഉം ഇതിനകം decode ചെയ്ത text-ഉം മാറ്റമില്ലാതെ കടന്നുപോകുന്നു
URL decoder ഉപയോഗിക്കേണ്ടതെന്തുകൊണ്ട്?
- Readable output: %20, %40, %3D-ഇവ space, @, =-ലേക്ക് തിരികെ convert ചെയ്ത് URL യഥാർത്ഥത്തിൽ എന്ത് പറയുന്നു എന്ന് വായിക്കുക
- International text: UTF-8 byte sequences-ൽ നിന്ന് accented, non-ASCII characters rebuild ചെയ്യുക — %C3%A9 വീണ്ടും é ആയി വായിക്കാം
- Debugging: Query string, OAuth redirect, അല്ലെങ്കിൽ webhook payload-ൽ ഉള്ള real values act ചെയ്യുന്നതിന് മുമ്പ് inspect ചെയ്യുക
- Standards-correct: RFC 3986 പ്രകാരം decode ചെയ്യുക — browsers, servers ഉപയോഗിക്കുന്ന അതേ rules, അതിനാൽ അവ കാണുന്നത് തന്നെ നിങ്ങളും കാണുന്നു
URL decoding-ന്റെ സാധാരണ applications എന്തൊക്കെ?
URL decoding പല web development scenarios-ൽ ഒഴിവാക്കാനാകാത്തതാണ്:
- Form Submissions: application/x-www-form-urlencoded GET, POST data-ൽ നിന്ന് original field values തിരികെ വായിക്കൽ
- API Development: API endpoint-ൽ arrive ചെയ്യുന്ന percent-encoded path, query parameters unpack ചെയ്യൽ
- File Systems: URL-ൽ travel ചെയ്യാൻ percent-encode ചെയ്ത file paths, names recover ചെയ്യൽ
- Links debug ചെയ്യൽ: Share ചെയ്ത അല്ലെങ്കിൽ log ചെയ്ത URLs decode ചെയ്ത് അവ carry ചെയ്യുന്ന special characters, international text കാണൽ
URL decoding example എങ്ങനെ ഇരിക്കും?
URL decoding-ന്റെ സാധാരണ examples: %20 (അല്ലെങ്കിൽ +) space ആകുന്നു, %40 ആകുന്നു @, %23 ആകുന്നു #, %26 ആകുന്നു &, %3D ആകുന്നു =. %C3%A9 പോലെ ഒരു UTF-8 sequence international character é ആകുന്നു.
Percent-encoding എന്നാൽ എന്ത്?
Percent-encoding, URI-ൽ unsafe അല്ലെങ്കിൽ reserved characters represent ചെയ്യാൻ RFC 3986 §2.1 define ചെയ്ത mechanism ആണ്. Rule ഇങ്ങനെ: literally appear ചെയ്യാൻ കഴിയാത്ത ഓരോ byte-ഉം percent sign-ഉം തുടർന്ന് രണ്ട് hexadecimal digits-ഉം ആയി write ചെയ്യുന്നു — %XX form — ഇവിടെ XX byte-ന്റെ value. é പോലുള്ള non-ASCII characters ആദ്യം UTF-8 byte sequence ആക്കി, ശേഷം ഓരോ byte-ഉം individually percent-encode ചെയ്യുന്നു. Developers ഇത് query strings, form submissions, OAuth callback URLs, REST API path parameters-ൽ, URL-ൽ punctuation, spaces, അല്ലെങ്കിൽ unreserved set A–Z a–z 0–9 - _ . ~-ന് പുറത്തുള്ള characters carry ചെയ്യേണ്ടിടത്ത് ദൈനംദിനം നേരിടുന്നു.
%C3%A9 decode ചെയ്ത് é ആകുന്നത് എങ്ങനെ?
Encoded query string ?q=caf%C3%A9&lang=fr എടുക്കുക. Decode ചെയ്യുന്നത് ?q=café&lang=fr produce ചെയ്യുന്നു. Byte-by-byte walk-through ഇങ്ങനെ:
- ഇൻപുട്ട്:
?q=caf%C3%A9&lang=fr - ഔട്ട്പുട്ട്:
?q=café&lang=fr
%C3→ byte0xC3(binary11000011) — ഒരു 2-byte UTF-8 sequence-ന്റെ lead byte.%A9→ byte0xA9(binary10101001) — continuation byte. കൂടിച്ചേർന്ന്,C3 A9U+00E9-ന്റെ UTF-8 encoding ആണ്, അതാണ്é.?,=,&characters untouched ഇരിക്കുന്നത് അവ structural ആണ് — query-ഉം key/value pairs-ഉം delimit ചെയ്യുന്നു. Literalcaf-ഉം pass through ആകുന്നു, lowercase ASCII letters unreserved set-ൽ ഉള്ളതിനാൽ.
decodeURIComponent-ഉം decodeURI-ഉം തമ്മിലുള്ള വ്യത്യാസം എന്ത്?
JavaScript രണ്ട് built-in decoders expose ചെയ്യുന്നു, ഇവ confuse ചെയ്യുന്നത് URL-handling-ലെ ഏറ്റവും സാധാരണ bugs ആണ്:
decodeURIComponent(str)എല്ലാ percent-encoded sequences-ഉം decode ചെയ്യുന്നു,&,=,?,/,#പോലുള്ള reserved characters ഉൾപ്പെടെ. Individual query-string values അല്ലെങ്കിൽ path segments-ൽ ഉപയോഗിക്കുക — ഒരിക്കലും whole URL-ൽ ഇല്ല.decodeURI(str)intentionally conservative ആണ്: reserved characters skip ചെയ്യുന്നു.%26feed ചെയ്യുന്നത് literal string%26return ചെയ്യുന്നു,&ഇല്ല. Structure survive ചെയ്യേണ്ട whole URIs-നാണ് ഇത് ഉദ്ദേശിക്കുന്നത്.
Rule of thumb: string URL-ന്റെ ഒരു ഭാഗമാണ് (ഒരൊറ്റ parameter, fragment, encoded filename), decodeURIComponent ഉപയോഗിക്കുക. ഈ ടൂൾ decodeURIComponent പോലെ behave ചെയ്യുന്നു — input-ലെ ഓരോ %XX sequence-ഉം decode ചെയ്യുന്നു, reserved characters ഉൾപ്പെടെ.
URL decode ചെയ്യുക എന്നത് അത് ശരിക്കും എന്ത് contain ചെയ്യുന്നു എന്ന് വായിക്കുന്ന രീതിയാണ്. മുകളിൽ ഒരു encoded string paste ചെയ്യൂ, ഓരോ %XX sequence-ഉം നിങ്ങളുടെ browser-ൽ തന്നെ അതിന്റെ character ആയി തിരിച്ചുമാറും — query parameter debug ചെയ്യാൻ, OAuth redirect check ചെയ്യാൻ, അല്ലെങ്കിൽ server-ലേക്ക് ഒന്നും അയക്കാതെ accented filename recover ചെയ്യാൻ.