Drop your file to analyze it

CFDG File

What are CFDG files and how to open them

Are you having problems opening a CFDG file or are you simply curious about its contents? We're here to explain the properties of these files and provide you with software that can open or handle your CFDG files.

What is a CFDG file?

A .CFDG file is a Context Free Design Grammar file.

Context Free Design Grammar is a plain-text scripting language used by the Context Free / ContextFree Art program to generate images, vector graphics, or animations by recursively applying shape definitions and transformation rules. A CFDG file contains definitions of named shapes, a designated start shape, and rules that say how each shape can be replaced by one or more other shapes (or primitive "drawing" operations) with transforms like scale, rotation, color, and translation. The purpose is to describe complex visuals through simple, recursive grammars rather than manual drawing.

These files are written and edited by artists or programmers working with Context Free. The program reads a CFDG file as its input, interprets its "startshape" directive and all "shape" and "rule" blocks, then renders either still images (e.g. PNG), vector images (e.g. SVG) or animated output like movies (MOV or similar) from the grammar. The workflow is: author grammar → run the Context Free / cfdg tool → produce artwork.

Shape rules may be weighted so that some replacement patterns happen more often than others, can define global variables or user‐functions, import external CFDG files, define custom paths as primitive drawing units, and adjust rendering properties such as tiling, symmetry, size, color, brightness, etc. Primitive shapes (SQUARE, CIRCLE, TRIANGLE, FILL) draw immediately when encountered in a rule.

The file begins with a "startshape" keyword giving the name of the initial shape. Then "shape NAME { … }" blocks define what children shapes or primitives replace that shape. Inside rules one sees "rule { … }" (or weighted versions like "rule 50% { … }") followed by lists of replacements each with associated shape adjustments in square brackets (for transform parameters and color changes) or recursive shape calls.

Technically, CFDG files are ASCII text scripts. Two common byte‐signatures help identify them: the file starts with "startshape" at offset zero (ASCII) and somewhere in the text contains the word "RULE" (uppercase).

How to open CFDG files

Important: Different programs may use files with the CFDG file extension for different purposes, so unless you are sure which format your CFDG file is, you may need to try a few different programs.

While we have not verified the app ourselves yet, our users have suggested a single CFDG opener which you will find listed below.

Last updated: August 31, 2026

Various apps that use files with this extension

These apps are known to open certain types of CFDG files. Remember, different programs may use CFDG files for different purposes, so you may need to try out a few of them to be able to open your specific file.

Context FreeContext FreeUser submitted

Help us help others

File.org helps thousands of users every day, and we would love to hear from you if you have additional information about CFDG file formats, example files, or compatible programs. Please use the links below or email us at submit@file.org to discuss further.