Inquiry about the .fig file format

Is the .fig file format property IP?

The Other design tools (sketch & adobe xd) file format is just a zip file containing JSON data.

If it isn’t property IP and just like other design tools (sketch & adobe xd) Figma doesn’t want to document the file format, which is understandable because it is a technical debt on your side.

It will be helpful to just give the community a hint on how the .fig file is constructed and I think the community will be able to easily reverse engineer the full file format specification.

As it has some use-cases for example:

  1. Archiving Figma files offline in case the Figma online goes out of service.
  2. Cross convert between file formats offline.
2 Likes

From the old discussion on Figma plugins Slack:

Gleb:
It’s definitely possible to decode the file but not sure how. Let me know if you find anything. The only thing I know about decoding .fig files is that their structure can change easily as it’s an internal format (hence it’s not documented — there is no standard). And I haven’t seen any apps for decoding them unfortunately.

Stas:
Looks like Figma is using kind of Protocol Buffers format with there own implementation → GitHub - evanw/kiwi: A schema-based binary format for efficiently encoding trees of data

Josh D:
Welp, I’ve managed to get the Figma schema (by doing some script debugging in the inspector), but for the life of me I can’t seem to properly decode enough of the data for it to be useful. Using kiwi’s command line interface I can do something like: node cli --schema figma.kiwi --root-type NodeChanges --to-json simple.fig but I can’t seem to guess what RootType would give me relevant info I could use.

I think it is waste of time to ask figma for any help regarding the .fig file format as mention in this comment https://github.com/evanw/kiwi/issues/23#issuecomment-650471134 it is “goes against our goals of ecosystem stability”.

I think it will be much better to ask the Photopea team for some help as they have successfully decoded the .fig file format on their own and will likely to collaborate with other open source project.

1 Like

Yes, it would be a good idea!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.