import urllib.parse # Encoded content from your example encoded_content = '%0A%5Bmysqld%5D%0A%0A%23%20GENERAL%20%23%0Auser%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20mysql%0Adefault-storage-engine%20%20%20%20%20%20%20%20%20%3D%20InnoDB%0A%23socket%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%2Fvar%2Flib%2Fmysql%2Fmysql.sock%0A%23pid-file%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%2Fvar%2Flib%2Fmysql%2Fmysqld.pid%0A%0A%23%20MyISAM%20%23%0A%23%20key-buffer-size%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%2032M%0A%23%20myisam-recover%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20FORCE%2CBACKUP%0A%0A%23%20SAFETY%20%23%0Amax-allowed-packet%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%2016M%0Amax-connect-errors%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%201000000%0Asql-mode%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20NO_ENGINE_SUBSTITUTION%2CNO_AUTO_CREATE_USER%0Asysdate-is-now%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%201%0Ainnodb-strict-mode%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%201%0A%0A%23%20DATA%20STORAGE%20%23%0Adatadir%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%2Fvar%2Flib%2Fmysql%0A%0A%23%20SERVER%20ID%20%23%20%0Aserver-id%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20747931%0A%0A%23%20CACHES%20AND%20LIMITS%20%23%0Amax-connections%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20500%0Atmp-table-size%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%2032M%0Amax-heap-table-size%20%20%20%20%20%20%20%20%20%20%20%20%3D%2032M%0Aquery-cache-type%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%200%0Aquery-cache-size%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%200%0Athread-cache-size%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%2050%0Aopen-files-limit%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%2065535%0Atable-definition-cache%20%20%20%20%20%20%20%20%20%3D%201024%0Atable-open-cache%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%202048%0A%0A%23%20INNODB%20%23%0Ainnodb-flush-method%20%20%20%20%20%20%20%20%20%20%20%20%3D%20O_DIRECT%0Ainnodb-log-files-in-group%20%20%20%20%20%20%3D%202%0Ainnodb-log-file-size%20%20%20%20%20%20%20%20%20%20%20%3D%20128M%0Ainnodb-flush-log-at-trx-commit%20%3D%201%0Ainnodb-file-per-table%20%20%20%20%20%20%20%20%20%20%3D%201%0Ainnodb-buffer-pool-size%20%20%20%20%20%20%20%20%3D%201228M%0A%0A%23%20LOGGING%20%23%0Alog-error%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%2Fvar%2Flib%2Fmysql%2Fmysqld.log%0Aslow-query-log%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%201%0Aslow-query-log-file%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%2Fvar%2Flib%2Fmysql%2Fmysqld-slow.log%0Alog-queries-not-using-indexes%20%20%3D%20OFF%0Along_query_time%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%2030%0A%0A%5Bmysqldump%5D%0Amax-allowed-packet%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%2016M%0A%0A!includedir%20%2Fetc%2Fmysql%2Fconf.d%2F%0A!includedir%20%2Fetc%2Fmysql%2Fmariadb.conf.d%2F%0A%' # Decoding it decoded_content = urllib.parse.unquote(encoded_content) print(decoded_content)