When working with Adobe Illustrator, many times you’ll find that the objects that you want to save as a JPG or SVG are on an artboard that is larger than the size of the object. If you save the artwork, the object including the whitespace around it up to the borders of the artboard is saved. This is usually not what you want. If you want to save just the object, you need to resize the artboard to fit the borders of the object.
Below, you’ll see the artboard is bigger than the object (I clicked on View > Outline to show an outline of the object).
Click the artboard tool (Shift-O) and position your mouse cursor over the object and then double-click.
This will crop the artboard to fit the size of the object.
UPDATE: Actually, there’s an easier way. Just select the artwork then choose Object > Artboards > Fit to Artwork Bounds.