Beware of scam unlocking / jailbreaking iPhone 3G / 3GS 3.1.3 sites — read more
This How-To collection includes step by step tutorials for the latest iPhone 3G / iPhone 3GS.
For firmware below 3.1.2 please visit this site.
PwnageTool for iPhone, iPhone 3G, iPhone 3GS and iPod touch

Overview
An update to a new firmware can result in an irreversible SIM lock.
Before you start with the unlock process you should check each software info.
iPhone 3G and 3GS unlockers should always be very wary before updating their firmware.
iPhone 3.1.3 baseband 05.12.01 unlockHow to unlock your iPhone running OS 3.1.3 baseband 05.12.01
PwnageTool with the support for firmware 3.1.3 will be released after the iOS 4 release. We are waiting for the day that Dev-Team releases the unlock tool for IPhone 3G OS 3.1.3 baseband 05.12.01.
BlackSn0w for iPhone 3.1.2How to unlock your iPhone 3GS / iPhone 3G on OS 3.1.2
Before continuing make sure your iPhone is on the 05.11.07 baseband. BlackSn0w is part of Blackra1n RC3 so you need to download both tools.
- Step 1
- Download BlackRa1n RC3 and BlackSn0w.
- Step 2
- Make sure your iPhone runs the firmware 3.1.2.
If not, update your iPhone to OS 3.1.2 (firmware update).
- Step 3
- Make sure iTunes is closed and plug your iPhone to the computer.
- Step 4
- Launch BlackRa1n RC3 and click the "make it ra1n" button. Your iPhone will be placed in recovery mode.
- Step 5
- BlackRa1n will now be installed on your iPhone and reboot when done so.
A message will appear asking to donate for GeoHot.
- Step 6
- Once your iPhone reboots you will notice a blackra1n icon on the Springboard. Make sure you are online and then press the icon to launch the application.
- Step 7
- You will be asked to select a package. Choose Cydia or Rock, select sn0w and press the install button at the top right of the screen.
- Step 8
- Close the "Post Install Log for sn0w". To remove Blackra1n press the uninstall button inside the BlackRa1n app.
- Step 9
- Done!
This instruction applies to iPhone 3GS / iPhone 3G running 3.1.2 using BlackSn0w for Mac and PC.