We report the detection of the doubly deuterated form of formaldehyde towards IRAS 16293-2422, an extremely young protobinary system. This is the only detection of D
2CO in any astronomical source other than Orion (Turner,
1990ApJ...362L..29T). The line searched was that corresponding to the 4
2,2-3
2,1 transition at ν
0=236.102GHz, and was detected at three positions, one centered on the source itself, and the other two 10" West and 10" East respectively. A survey of the literature revealed that two additional lines of D
2CO at 245.532 and 342.522GHz were detected towards IRAS 16293-2422, but classified as ``unidentified''.We failed to detect any signal towards the outflow (at offsets (-20";0") and (-30";+10")) where low-J CO emission lines are quite strong. The line profiles at the three positions show a dip at the zero rest velocity. We rule out the possibility that this dip may be due to a pure kinematic effect and show that it is actually due to self absorption. The gas responsible for the D
2CO emission is located at less than about 10" (∼2x10
16cm) from the central source. We used multi-transition H
2CO observations of van Dishoeck et al. (
1995ApJ...447..760V) to estimate the density (n
H2∼10
7cm
–3) and temperature (T∼100K) of the emitting gas. From those values, we can derive a lower limit to the column density required for the D
2CO line we observed to be self-absorbed: N(D
2CO)∼10
14cm
–2. Combining the previous and present observations of H
2CO, HDCO and D
2CO we obtain the following upper limits to the abundance ratios of the three species: [HDCO]/[H
2CO]≤0.25 and [D
2CO]/[HDCO]≤0.5. If the abundance of H
2CO in IRAS 16293-2422 is comparable to that observed towards the Hot Cores in Orion (∼10
–8; Blake et al.,
1987ApJ...315..621B) and if the D
2CO 4
2,2-3
2,1 line is only moderately thick, D
2CO is only 1/10 less abundant than H
2CO. We finally speculate that such a large amount of warm D
2CO can only be produced by evaporation of this molecule from the grain mantles, where it was presumably copiously formed during the long pre-collapse period.