Instantly share code, notes, and snippets.

Embed
What would you like to do?
JavaScript: BF4 Battlelog Emblem Import / Export

Exporting an emblem

  1. Log into BF4 Battlelog.
  2. Visit the Customize emblem page.
  3. Select the emblem you wish to export.
  4. Open the console (Ctrl-Shift-J).
  5. Enter the following code snippet to copy the raw emblem data to the clipboard:
    copy('emblem.emblem.load('+JSON.stringify(emblem.emblem.data,null,2)+');');
  6. Paste somewhere useful, like a gist. Whatever.
  7. Close the console (Ctrl-Shift-J).

Importing an emblem

  1. Log into BF4 Battlelog.
  2. Visit the Customize emblem page.
  3. Click the "+ ADD" button to create a new, blank, emblem.
  4. Open the console (Ctrl-Shift-J).
  5. Paste the contents of a previously-exported emblem into the console and press Enter, making sure you get everything, from the emblem.emblem.load to the ending ;. (You should now see the emblem loaded with all its layers)
  6. Close the console (Ctrl-Shift-J).
  7. Click the "SAVE & USE" button in the top right.

Notes

  • Premium members have a 40 object limit per emblem.
  • Non-premium members have a 20 object limit per emblem.
  • Only tested in Chrome browser.

Examples

BF4 emblem examples

Enjoy!

emblem.emblem.load({
"objects": [
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 165.543680176,
"height": 278.1690107426,
"width": 312.4967822755,
"asset": "Heart",
"selectable": false,
"left": 159.2483911378,
"fill": "#92278F"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 168.3029338849,
"height": 255.2425062537,
"width": 286.7410057335,
"asset": "Heart",
"selectable": false,
"left": 159.3705028668,
"fill": "#EC008C"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 116.7378075704,
"height": 62.8910840779,
"width": 44.7426825594,
"asset": "Number3",
"selectable": true,
"left": 53.7997787797,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 117.2065525495,
"height": 62.4131050989,
"width": 15,
"asset": "Stroke",
"selectable": true,
"left": 38.5,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 118.1956914895,
"height": 58.090248718,
"width": 11.6180497436,
"asset": "Stroke",
"selectable": true,
"left": 88.086477813,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 139,
"height": 16,
"width": 24,
"asset": "Square",
"selectable": true,
"left": 95,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 115.7268870895,
"height": 50.2607051637,
"width": 37.1926076918,
"asset": "Number0",
"selectable": true,
"left": 130.5966163458,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 115.2816752288,
"height": 48.8822488185,
"width": 36.1725586117,
"asset": "Number0",
"selectable": true,
"left": 174.0865918058,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": true,
"flipY": false,
"top": 117.2793064167,
"height": 60.124158896,
"width": 42.7719508626,
"asset": "Number9",
"selectable": true,
"left": 220.8162879313,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 146.2528934958,
"height": 36.5057869916,
"width": 32.8224373822,
"asset": "Square",
"selectable": true,
"left": 228.4112186911,
"fill": "#EC008C"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 117.8950486535,
"height": 60.4764193624,
"width": 43.0236806897,
"asset": "Number6",
"selectable": true,
"left": 270.0970992261,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 130,
"height": 14,
"width": 28.4924684457,
"asset": "Square",
"selectable": true,
"left": 262.7537657771,
"fill": "#EC008C"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 202.5043865558,
"height": 81.4291394861,
"width": 104.8381988008,
"asset": "Skull2",
"selectable": true,
"left": 159.4190994004,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 193.4250030518,
"height": 19.1499938965,
"width": 37,
"asset": "Square",
"selectable": true,
"left": 158.5,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 195.8819062968,
"height": 14.5511751994,
"width": 14.5730799378,
"asset": "Heart",
"selectable": true,
"left": 149.2865399689,
"fill": "#EC008C"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 195.8078909016,
"height": 14.0565417683,
"width": 15.7912057162,
"asset": "Heart",
"selectable": true,
"left": 168.2029187301,
"fill": "#EC008C"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 115.6083374023,
"height": 34.7833251953,
"width": 19.9916207012,
"asset": "Square",
"selectable": true,
"left": 129.9958103506,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 114.6083374023,
"height": 34.7833251953,
"width": 25,
"asset": "Square",
"selectable": true,
"left": 177.5,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 117.0095824637,
"height": 20.200790904,
"width": 22.6936930899,
"asset": "Heart",
"selectable": true,
"left": 130.346846545,
"fill": "#EC008C"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 116.1911566625,
"height": 19.7890329178,
"width": 22.2311216287,
"asset": "Heart",
"selectable": true,
"left": 174.1155608144,
"fill": "#EC008C"
}
]
});
emblem.emblem.load({
"objects": [
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 162.67559142,
"height": 241.0597255536,
"width": 241.0597255536,
"asset": "Circle",
"selectable": false,
"left": 160,
"fill": "#000044"
},
{
"opacity": 1,
"angle": 9.8449622714,
"flipX": false,
"flipY": false,
"top": 210.7020048985,
"height": 183.1122538004,
"width": 215.311634877,
"asset": "Circle",
"selectable": false,
"left": 159.1928738319,
"fill": "#FED026"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 164.9827483684,
"height": 300.2382018308,
"width": 300.2382018308,
"asset": "Time",
"selectable": false,
"left": 160.2539497237,
"fill": "#0000DD"
},
{
"opacity": 1,
"angle": 18.6981204006,
"flipX": false,
"flipY": false,
"top": 75.2736622355,
"height": 76.8578515137,
"width": 54.5103176137,
"asset": "Circle",
"selectable": false,
"left": 142.3120851603,
"fill": "#FED026"
},
{
"opacity": 1,
"angle": -53.8517939244,
"flipX": false,
"flipY": false,
"top": 131.6250685461,
"height": 107.1214859129,
"width": 133.6329496051,
"asset": "Circle",
"selectable": false,
"left": 131.5749078382,
"fill": "#FED026"
},
{
"opacity": 1,
"angle": 73.7132718468,
"flipX": false,
"flipY": false,
"top": 92.8250119189,
"height": 66.6159229308,
"width": 37.0475962787,
"asset": "Clubs",
"selectable": false,
"left": 178.1700821385,
"fill": "#FED026"
},
{
"opacity": 1,
"angle": 21.3296522212,
"flipX": false,
"flipY": false,
"top": 100.0619362606,
"height": 35,
"width": 44.9160032735,
"asset": "Circle",
"selectable": false,
"left": 80.5215348795,
"fill": "#FED026"
},
{
"opacity": 1,
"angle": 99.7579403526,
"flipX": false,
"flipY": false,
"top": 94.7600546878,
"height": 22.118347518099995,
"width": 12.2461866127,
"asset": "StrokeBent",
"selectable": false,
"left": 77.2463009127,
"fill": "#000000"
},
{
"opacity": 1,
"angle": -82.6167762948,
"flipX": false,
"flipY": false,
"top": 113.2626692731,
"height": 27.176483107,
"width": 9.4268270567,
"asset": "StrokeBent",
"selectable": false,
"left": 74.8651652794,
"fill": "#000000"
},
{
"opacity": 1,
"angle": 150.5751099154,
"flipX": false,
"flipY": false,
"top": 91.3204776365,
"height": 20.6489649209,
"width": 7.444392030000001,
"asset": "StrokeBent",
"selectable": false,
"left": 95.035378517,
"fill": "#000000"
},
{
"opacity": 1,
"angle": -30.2030113802,
"flipX": false,
"flipY": false,
"top": 172.1544028607,
"height": 116.4942004094,
"width": 133.7782817017,
"asset": "Circle",
"selectable": false,
"left": 146.9029169854,
"fill": "#000000"
},
{
"opacity": 1,
"angle": -48.1515396594,
"flipX": false,
"flipY": false,
"top": 185.5196200565,
"height": 82.9618903704,
"width": 61.2014991798,
"asset": "Circle",
"selectable": false,
"left": 139.0384048893,
"fill": "#FF00FF"
},
{
"opacity": 1,
"angle": -69.6914698038,
"flipX": false,
"flipY": false,
"top": 192.9046916982,
"height": 100.4456260879,
"width": 73.387653814,
"asset": "Circle",
"selectable": false,
"left": 169.2956383078,
"fill": "#000000"
},
{
"opacity": 1,
"angle": 12.846317174,
"flipX": false,
"flipY": false,
"top": 165.7624392485,
"height": 25.9900581782,
"width": 40,
"asset": "Circle",
"selectable": false,
"left": 136.7845232976,
"fill": "#FF00FF"
},
{
"opacity": 1,
"angle": 103.6792971144,
"flipX": false,
"flipY": false,
"top": 156.278818536,
"height": 35.5722663693,
"width": 10.5214924579,
"asset": "StrokeBent",
"selectable": false,
"left": 125.4432536714,
"fill": "#000000"
},
{
"opacity": 1,
"angle": -60.6104296723,
"flipX": false,
"flipY": false,
"top": 178.7102969399,
"height": 40.9312624997,
"width": 9.5889378831,
"asset": "StrokeBent",
"selectable": false,
"left": 132.3144496213,
"fill": "#000000"
},
{
"opacity": 1,
"angle": 38.6247836035,
"flipX": false,
"flipY": false,
"top": 151.5777015291,
"height": 48.2885835083,
"width": 74.9006674816,
"asset": "Circle",
"selectable": false,
"left": 192.5719623612,
"fill": "#FED026"
},
{
"opacity": 1,
"angle": 31.7147633455,
"flipX": false,
"flipY": true,
"top": 113.7700912316,
"height": 28.827270182600003,
"width": 64.5133360223,
"asset": "Wingpart",
"selectable": false,
"left": 176.2461656327,
"fill": "#FED026"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 179.1093280029,
"height": 44.2186560059,
"width": 59,
"asset": "Eye2",
"selectable": false,
"left": 188.5,
"fill": "#000000"
},
{
"opacity": 1,
"angle": -9.9655098888,
"flipX": false,
"flipY": false,
"top": 189.6693435599,
"height": 58.9966693179,
"width": 62.44221213510001,
"asset": "Eye2",
"selectable": false,
"left": 189.2898718639,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": -25.5772907774,
"flipX": false,
"flipY": false,
"top": 212.0227392557,
"height": 67.7565630065,
"width": 112.6364833401,
"asset": "Circle",
"selectable": false,
"left": 180.5673598689,
"fill": "#000000"
},
{
"opacity": 1,
"angle": -24.8429843525,
"flipX": false,
"flipY": false,
"top": 218.1142524455,
"height": 72.1246297005,
"width": 120,
"asset": "Circle",
"selectable": false,
"left": 182.8711675427,
"fill": "#FED026"
},
{
"opacity": 1,
"angle": 0.0114819408,
"flipX": false,
"flipY": false,
"top": 122.8668492277,
"height": 27.7339116923,
"width": 79.0062600303,
"asset": "Eye2",
"selectable": false,
"left": 163.4665761733,
"fill": "#000000"
},
{
"opacity": 1,
"angle": -0.72850203,
"flipX": false,
"flipY": false,
"top": 123.0508535549,
"height": 22.0236505408,
"width": 72.0958954665,
"asset": "Eye2",
"selectable": false,
"left": 162.0006466255,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 65.212036549,
"height": 34.3249558556,
"width": 32.9398241384,
"asset": "Circle",
"selectable": false,
"left": 171.5300879308,
"fill": "#000000"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 65.406788944,
"height": 28.180140704900005,
"width": 29.3561679944,
"asset": "Circle",
"selectable": false,
"left": 171.3219160028,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 70.0146036097,
"height": 12.0292072194,
"width": 13.2449828681,
"asset": "Circle",
"selectable": false,
"left": 167.7924695664,
"fill": "#00A651"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 70.3988820112,
"height": 34.4363093099,
"width": 34.4363093099,
"asset": "Circle",
"selectable": false,
"left": 145.957724742,
"fill": "#000000"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 70.4709188947,
"height": 29.1832027175,
"width": 29.1832027175,
"asset": "Circle",
"selectable": false,
"left": 145.7727202493,
"fill": "#FFFFFF"
},
{
"opacity": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"top": 75.5709409427,
"height": 13.420554225300002,
"width": 13.420554225300002,
"asset": "Circle",
"selectable": false,
"left": 152.9480143446,
"fill": "#00A651"
},
{
"opacity": 1,
"angle": 134.0880014336,
"flipX": false,
"flipY": false,
"top": 242.87848712,
"height": 27.391548209499998,
"width": 37.3683229328,
"asset": "MedalPart3",
"selectable": false,
"left": 227.3729061228,
"fill": "#000000"
},
{
"opacity": 1,
"angle": 66.5666816187,
"flipX": false,
"flipY": false,
"top": 18.4608587996,
"height": 51.1255851448,
"width": 37.1145437212,
"asset": "Wing4",
"selectable": false,
"left": 155.8213698958,
"fill": "#000000"
},
{
"opacity": 1,
"angle": 67.3065981816,
"flipX": false,
"flipY": false,
"top": 18.9647540823,
"height": 47.7056341809,
"width": 30.48166404,
"asset": "Wing4",
"selectable": false,
"left": 156.3157031216,
"fill": "#00BFF3"
}
]
});
@kurtextrem

This comment has been minimized.

kurtextrem commented Oct 6, 2013

Really nice, thanks!

@Sliver-Spy

This comment has been minimized.

Sliver-Spy commented Oct 9, 2013

Ben I have tried everything but it keep saying "undifined"

@patrio

This comment has been minimized.

patrio commented Oct 14, 2013

It should. The console command "copy" itself exports it to your clipboard (no return value, hence undefined). Just paste in any text area after you have ran the command.

@judbd

This comment has been minimized.

judbd commented Nov 4, 2013

I forked it, the correct command for copy is now

$('body').html('<pre style="color:#000;">emblem.emblem.load('+JSON.stringify(emblem.emblem.data,null,2)+');</pre>');

@steelx

This comment has been minimized.

steelx commented Nov 9, 2013

@cowboy thanks man. Could you please help me with getting BF4 Battlelog JSON or any API to get stats ?
Im looking to get my teams BF4 stats for my website www.aajamarwale.com

@SeriousM

This comment has been minimized.

SeriousM commented Nov 14, 2013

Could you please help me with getting BF4 Battlelog JSON or any API to get stats ?
Im looking to get my teams BF4 stats for my website www.aajamarwale.com

Here you go: http://bf4stats.com/

@gzlock

This comment has been minimized.

gzlock commented Nov 15, 2013

How use this json data generated as picture(jpg format)?

@angelpcadena

This comment has been minimized.

angelpcadena commented Dec 3, 2013

When viewing your soldier profile, click ON the emblem (not customize) it should open on a popup, right click, save as.

@pelox73

This comment has been minimized.

pelox73 commented Dec 3, 2013

Hello
load emblem and error

emblem error not unlocked shapes

please help

@Spietzack

This comment has been minimized.

Spietzack commented Dec 6, 2013

Hello! I would like to delete one of my emblems from http://emblemsbf.com. I can't fins a way to do it anywhere on the webpage. Also Can I change my log in info or username so it's not my facebook name? I would like to change it to my gaming name.

@smoggy46

This comment has been minimized.

smoggy46 commented Apr 8, 2014

Hiya, ive found an emblem i like, i copy and paste but at the console, i cant paste as there is no option for this?

@marcinkubica

This comment has been minimized.

marcinkubica commented Jul 26, 2014

Hi
How about gif/jpg/pcm->emblem? Get your image battlelog emblems generated in no time. Aye 8-1

@MADARAAAA1337

This comment has been minimized.

MADARAAAA1337 commented Aug 5, 2014

@nchapa96

This comment has been minimized.

nchapa96 commented Mar 3, 2017

need to convert a personal emblem into a code.. does any 1 know how to do it? and how much $, or if u can give me webpage.. THKS..

@NoxaZerrok

This comment has been minimized.

NoxaZerrok commented Mar 22, 2017

:b i saw your deadpool emblem and i am looking for someone who could /want create a logo/ avator for my twitch site i plan to start in 1weeks
and your name will be in the credits ^^ are you interested ? noxazerrok4thewin@googlemail.com

@c221964

This comment has been minimized.

c221964 commented Aug 14, 2018

Olá, gostaria de saber como importar na Batlelog um emblema pessoal meu. Podem me ajudar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment