A process for the electrochemical fluorination of an organic compound comprising the steps of: a) providing an organic compound comprising at least one hydrogen atom bound to a carbon atom which is selected from compounds of the general formula I wherein X is O, N-R 3 or CR 4 R 5, R 1 is selected from C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, formyl, C 1 -C 6 -alkylcarbonyl and C 1 -C 6 -alkyloxycarbonyl, wherein R 1 may also be C 1 -C 6 -alkoxy if X is a CR 4 R 5 group, wherein R 1 may also be C 1 -C 6 -alkylcarbonyloxy if X is a N-R 3 or CR 4 R 5 group, R 2 is selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, C 6 -C 10 -aryl-C 1 -C 6 -alkyl, C 3 -C 12 -cycloalkyl and C 6 -C 10 -aryl, R 3 is selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, formyl, C 1 -C 6 -alkylcarbonyl and C 1 -C 6 -alkyloxycarbonyl, R 4 and R 5 are independently selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl and C 1 -C 6 -alkoxy, or R 1 and R 2 together with the X-(C=O)-O group to which they are bound form a 5- to 7-membered heterocyclic ring, which may contain at least one additional heteroatom or heteroatom containing group, selected from O, S, NR a or C=O, wherein R a is selected from hydrogen, alkyl, cycloalkyl and aryl, or X is a CR 4 R 5 group and R 1 and R 4 together with the carbon atom to which they are bound form a 3 to 7 membered carbocyclic ring; b) providing, in an electrochemical cell comprising a cathode and an anode, a liquid reaction medium comprising the organic compound and a fluorinating agent which is a HF-complex selected from polyhydrofluoride complexes of trialkylamines and tetraalkylammoniumfluorides; c) electrolyzing the liquid reaction medium to cause replacement of at least a part of said hydrogen atoms with fluorine atoms, characterized in that a gas diffusion layer electrode is used as the anode, wherein the gas diffusion layer electrode comprises a fibre layer or substrate and a microporous layer consisting of carbon particles attached to each other. a) providing an organic compound comprising at least one hydrogen atom bound to a carbon atom which is selected from compounds of the general formula I wherein X is O, N-R 3 or CR 4 R 5, R 1 is selected from C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, formyl, C 1 -C 6 -alkylcarbonyl and C 1 -C 6 -alkyloxycarbonyl, wherein R 1 may also be C 1 -C 6 -alkoxy if X is a CR 4 R 5 group, wherein R 1 may also be C 1 -C 6 -alkylcarbonyloxy if X is a N-R 3 or CR 4 R 5 group, R 2 is selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, C 6 -C 10 -aryl-C 1 -C 6 -alkyl, C 3 -C 12 -cycloalkyl and C 6 -C 10 -aryl, R 3 is selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, formyl, C 1 -C 6 -alkylcarbonyl and C 1 -C 6 -alkyloxycarbonyl, R 4 and R 5 are independently selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl and C 1 -C 6 -alkoxy, or R 1 and R 2 together with the X-(C=O)-O group to which they are bound form a 5- to 7-membered heterocyclic ring, which may contain at least one additional heteroatom or heteroatom containing group, selected from O, S, NR a or C=O, wherein R a is selected from hydrogen, alkyl, cycloalkyl and aryl, or X is a CR 4 R 5 group and R 1 and R 4 together with the carbon atom to which they are bound form a 3 to 7 membered carbocyclic ring; X is O, N-R 3 or CR 4 R 5, R 1 is selected from C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, formyl, C 1 -C 6 -alkylcarbonyl and C 1 -C 6 -alkyloxycarbonyl, wherein R 1 may also be C 1 -C 6 -alkoxy if X is a CR 4 R 5 group, wherein R 1 may also be C 1 -C 6 -alkylcarbonyloxy if X is a N-R 3 or CR 4 R 5 group, R 2 is selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, C 6 -C 10 -aryl-C 1 -C 6 -alkyl, C 3 -C 12 -cycloalkyl and C 6 -C 10 -aryl, R 3 is selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl, formyl, C 1 -C 6 -alkylcarbonyl and C 1 -C 6 -alkyloxycarbonyl, R 4 and R 5 are independently selected from hydrogen, C 1 -C 6 -alkyl, C 1 -C 6 -alkoxy-C 1 -C 6 -alkyl and C 1 -C 6 -alkoxy, or R 1 and R 2 together with the X-(C=O)-O group to which they are bound form a 5- to 7-membered heterocyclic ring, which may contain at least one additional heteroatom or heteroatom containing group, selected from O, S, NR a or C=O, wherein R a is selected from hydrogen, alkyl, cycloalkyl and aryl, b) providing, in an electrochemical cell comprising a cathode and an anode, a liquid reaction medium comprising the organic compound and a fluorinating agent which is a HF-complex selected from polyhydrofluoride complexes of trialkylamines and tetraalkylammoniumfluorides; c) electrolyzing the liquid reaction medium to cause replacement of at least a part of said hydrogen atoms with fluorine atoms,