You can use decodeURIComponent()
to decode a URL-encoded string back into its original format.
Example:
const encodedURL = 'https%3A%2F%2Fexample.com%2F%3Fname%3DJohn%20Doe';
const decodedURL = decodeURIComponent(encodedURL);
console.log(decodedURL); // 'https://example.com/?name=John Doe'
Tags: basic, JavaScript, encoding
URL: https://www.tiktok.com/@jsmentoring/photo/7459171752271269153