diff --git a/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue b/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue
index d76f9fe..6f6fa86 100644
--- a/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue
+++ b/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue
@@ -361,8 +361,11 @@
           </template>
         </b-btn>
         <a
-          :href="`data:text/json;charset=utf-8,${csrString}`"
-          download="certificate.txt"
+          :href="
+            `data:application/json;charset=utf-8,` +
+            encodeURIComponent(`${csrString}`)
+          "
+          download="certificate.csr"
           class="btn btn-primary"
         >
           {{ $t('global.action.download') }}
