I use Illustrator to export coordinates (x, y, width and height) of rectangles to JSON. I use JSON to import the coordinates into my web app and repaint them. I use the free Illustrator extension 'Drawnscript' for this task.

Problem: When I export the coordinates of rectangles there are only x, y, width and height in the JSON. Illustrator makes it possible to give an rectangle a name. I am missing the 'name' of the rectangle in JSON.

Question: How can I pass the name from an rectangle to JSON additional to the coordinates? Are there any better exporting tools than Drawnscript?


2 Answers 2


I think I understand your problem, but I don't get why you want to use JSON? Could you be more specific on the usage of a further JSON file containing rect values? Have you consider using SVG export? Cause in SVG you can add your own parameter directly from Illustrator such as Layers name, etc.. and use it back through HTML or CSS.

By the way, I just found this on Github, it looks like you can export from PS and Illu into json, and I can see a "name" tag in the export example. https://github.com/bronzehedwick/Adobe-Export-Scripts


Have you considered exporting your graphics as a JavaScript function that draws the graphics on a Web canvas? Look at WebCode or a similar app. You can export an SVG from Illustrator, open it in WebCode, and export JavaScript that contains both the drawing code and the name of the graphic.

  • Thank you for your answer. No, I do not draw the graphics on a canvas.
    – Simon
    Feb 24, 2016 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.