diff --git a/layouts/404.html b/layouts/404.html
index 98f4a67..d81000e 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -36,10 +36,10 @@
             const wrongUrl = new URL(window.location.href);
 
             /// Get the search keyword from the wrong URL by removing all slashes and dashes
-            const searchKeyword = wrongUrl.pathname.split(/[/|-]/).join(' ').trim();
+            const searchKeyword = decodeURIComponent(wrongUrl.pathname).split(/[/|-]/).join(' ').trim();
 
             document.getElementById('searchInput').setAttribute('value', searchKeyword);
         </script>
     {{- end -}}
     {{ partialCached "footer/footer" . }}
-{{ end }}
\ No newline at end of file
+{{ end }}