You learn a lot in the first year or two on a job. Looking at it from a hiring position I would never take on an inexperienced dev on a contract (no offence, you may be great). Junior positions are like an apprenticeship; you know you're sinking time into someone but are hoping that over time they'll start providing value. Contractors are generally expected to have experience and, accordingly, they cost more.
If you've spent a bit of time at a job (2 years is a fairly normal time to leave) there are a couple of tricks you could try that worked for me.
A) Tell them you're leaving but you're available for contract work. You're a known quantity, you know their systems/products and can work efficiently when they need the extra resources. They will send you work (and some will just take you back on a contract straight away - that's how I started contracting).
B) If you've worked at an agency, ask to take some of their clients. It might sound insane, but every agency has clients they don't really want. Small clients that have been around for a while that they still need to service. That work is just unprofitable noise as an agency grows bigger. As a one-man-band it's perfect. The client is used to paying agency rates and with you they get personal service from the person who was doing their dev work anyway. I have clients from this arrangement that have been amazing.
Hope that helps in some small way.