I'm working on a 2D platform game in my spare time that I hope to sell someday, although it will take some inspiration from Sonic among other games it isn't Sonic related.
As part of developing the game I needed a level editor so I could throw stuff together for testing. While the editor is no-where near finished (or ready for use - you can't even save yet!) I've open sourced it under the LGPL and made the code available on launchpad: http://launchpad.net/platformation
I intend to write a exporter plugin API so that people can use it for the own games (e.g. Sonic fangames - hence my post here )
Here are the features:
1. Load tiles from a directory of images (e.g. png)
2. Edit the solid areas of tiles  these areas are saved to an XML file alongside the tile image
3. Add/delete layers (can't yet rename, move them, or toggle them, activating is flakey)
4. Add/delete instances of tiles
It's written in C++ with OpenGL and Gtk and developed on Ubuntu. I will port it to Windows when I have a chance.
Anyway, if anyone is interested the code is there, I'm happy to accept feature requests/patches/feedback. I've got a basic set of features I need to finish before I can continue with my game, so there should be a lot of progress over the next few weeks and then it'll calm down as I move onto the game itself. Again, it's REALLY EARLY in development, I've only been working on it over a month or so just an hour or two here and there.
Hopefully it is useful for someone.
P.S. Is there a Sonic engine out there that uses a documented file format for the levels? That way I could knock together an example level exporter, just a thought.
 The inspiration for this came from a YouTube video I saw once, which I think was a development version of Sonic Maker, I'm not totally sure I couldn't find the video when I went to code it. It seemed like a simple way to do things, so if the developer is on here - thanks for the inspiration!